from symbide.src.parsing import parsers
from symbide.src.execution.additionalFunctions import _show

#TODO: Find out why this import needs 23MB. (Possibly Pyglet) 

from sympy.plotting.plot import Plot

class Sympyplot(Plot):
    def __init__(self, input, *args, **kwargs):
        kwargs.update({'visible':False})
        Plot.__init__(self, *args, **kwargs)
        self.input = input
    
    def show(self):
        executor._show(self.input, self)
        
    def toxml(self):
        return parsers['plot'].plot_to_xml(self)
